]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
shell-recorder: Ensure we remove the redraw timeout on finalize
authorRui Matos <tiagomatos@gmail.com>
Mon, 6 Jun 2016 18:26:28 +0000 (20:26 +0200)
committerRui Matos <tiagomatos@gmail.com>
Tue, 28 Jun 2016 17:03:32 +0000 (19:03 +0200)
Otherwise we may end up using freed memory and crashing

https://bugzilla.gnome.org/show_bug.cgi?id=767001

src/shell-recorder.c

index 84d68f56b9a07d05175975cae27128b536bf6cec..ef729ff5fda67dd349cf41baed629834f923d98a 100644 (file)
@@ -107,6 +107,8 @@ static void recorder_set_draw_cursor (ShellRecorder *recorder,
 static void recorder_pipeline_set_caps (RecorderPipeline *pipeline);
 static void recorder_pipeline_closed   (RecorderPipeline *pipeline);
 
+static void recorder_remove_redraw_timeout (ShellRecorder *recorder);
+
 enum {
   PROP_0,
   PROP_SCREEN,
@@ -235,6 +237,8 @@ shell_recorder_finalize (GObject  *object)
   recorder_set_pipeline (recorder, NULL);
   recorder_set_file_template (recorder, NULL);
 
+  recorder_remove_redraw_timeout (recorder);
+
   g_clear_object (&recorder->a11y_settings);
 
   G_OBJECT_CLASS (shell_recorder_parent_class)->finalize (object);